package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "app_user", catalog = "")
public class AppUser implements Serializable {
    private Long id;
    private String appUuid;
    private String appName;
    private String appPhone;
    private String appPassword;
    private Long appTime;
    private Long appMoTime;
    private String appImg;
    private String appAddress;
    private String appRemove;
    private String appProvince;
    private String appCity;
    private String appCountry;
    private String appTown;
    private String appVice;
    private String appSex;
    private String ordUuid;
    private String address_all;
    private String token;
    private String userNumber; //身份证号
    private Integer appViceId; //最高权限的角色id
    private Integer appMaintain; //是否为维修用户 (废除)


    @Basic
    @Column(name = "app_maintain")
    public Integer getAppMaintain() {
        return appMaintain;
    }

    public void setAppMaintain(Integer appMaintain) {
        this.appMaintain = appMaintain;
    }

    @Basic
    @Column(name = "app_vice_id")
    public Integer getAppViceId() {
        return appViceId;
    }

    public void setAppViceId(Integer appViceId) {
        this.appViceId = appViceId;
    }

    @Basic
    @Column(name = "user_number")
    public String getUserNumber() {
        return userNumber;
    }

    public void setUserNumber(String userNumber) {
        this.userNumber = userNumber;
    }

    @Basic
    @Column(name = "address_all")
    public String getAddress_all() {
        return address_all;
    }

    public void setAddress_all(String address_all) {
        this.address_all = address_all;
    }


    @Basic
    @Column(name = "app_sex")
    public String getAppSex() {
        return appSex;
    }

    public void setAppSex(String appSex) {
        this.appSex = appSex;
    }

    @Basic
    @Column(name = "app_mo_time")
    public Long getAppMoTime() {
        return appMoTime;
    }

    public void setAppMoTime(Long appMoTime) {
        this.appMoTime = appMoTime;
    }

    @Basic
    @Column(name = "token")
    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "app_uuid")
    public String getAppUuid() {
        return appUuid;
    }

    public void setAppUuid(String appUuid) {
        this.appUuid = appUuid;
    }

    @Basic
    @Column(name = "app_name")
    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Basic
    @Column(name = "app_phone")
    public String getAppPhone() {
        return appPhone;
    }

    public void setAppPhone(String appPhone) {
        this.appPhone = appPhone;
    }

    @Basic
    @Column(name = "app_password")
    public String getAppPassword() {
        return appPassword;
    }

    public void setAppPassword(String appPassword) {
        this.appPassword = appPassword;
    }

    @Basic
    @Column(name = "app_time")
    public Long getAppTime() {
        return appTime;
    }

    public void setAppTime(Long appTime) {
        this.appTime = appTime;
    }

    @Basic
    @Column(name = "app_img")
    public String getAppImg() {
        return appImg;
    }

    public void setAppImg(String appImg) {
        this.appImg = appImg;
    }

    @Basic
    @Column(name = "app_address")
    public String getAppAddress() {
        return appAddress;
    }

    public void setAppAddress(String appAddress) {
        this.appAddress = appAddress;
    }

    @Basic
    @Column(name = "app_remove")
    public String getAppRemove() {
        return appRemove;
    }

    public void setAppRemove(String appRemove) {
        this.appRemove = appRemove;
    }

    @Basic
    @Column(name = "app_province")
    public String getAppProvince() {
        return appProvince;
    }

    public void setAppProvince(String appProvince) {
        this.appProvince = appProvince;
    }

    @Basic
    @Column(name = "app_city")
    public String getAppCity() {
        return appCity;
    }

    public void setAppCity(String appCity) {
        this.appCity = appCity;
    }

    @Basic
    @Column(name = "app_country")
    public String getAppCountry() {
        return appCountry;
    }

    public void setAppCountry(String appCountry) {
        this.appCountry = appCountry;
    }

    @Basic
    @Column(name = "app_town")
    public String getAppTown() {
        return appTown;
    }

    public void setAppTown(String appTown) {
        this.appTown = appTown;
    }

    @Basic
    @Column(name = "app_vice")
    public String getAppVice() {
        return appVice;
    }

    public void setAppVice(String appVice) {
        this.appVice = appVice;
    }

    @Basic
    @Column(name = "ord_uuid")
    public String getOrdUuid() {
        return ordUuid;
    }

    public void setOrdUuid(String ordUuid) {
        this.ordUuid = ordUuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AppUser appUser = (AppUser) o;
        return Objects.equals(id, appUser.id) &&
                Objects.equals(appUuid, appUser.appUuid) &&
                Objects.equals(appName, appUser.appName) &&
                Objects.equals(appPhone, appUser.appPhone) &&
                Objects.equals(appPassword, appUser.appPassword) &&
                Objects.equals(appTime, appUser.appTime) &&
                Objects.equals(appImg, appUser.appImg) &&
                Objects.equals(appAddress, appUser.appAddress) &&
                Objects.equals(appRemove, appUser.appRemove) &&
                Objects.equals(appProvince, appUser.appProvince) &&
                Objects.equals(appCity, appUser.appCity) &&
                Objects.equals(appCountry, appUser.appCountry) &&
                Objects.equals(appTown, appUser.appTown) &&
                Objects.equals(appVice, appUser.appVice) &&
                Objects.equals(ordUuid, appUser.ordUuid);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, appUuid, appName, appPhone, appPassword, appTime, appImg, appAddress, appRemove, appProvince, appCity, appCountry, appTown, appVice, ordUuid);
    }


}
